package com.gao.spring.annotation;

import org.springframework.stereotype.Component;

/**
 * @Projectname SSM
 * @Filename CalculatorImpl
 * @Author an
 * @Data 2022/8/2 16:17
 * @Description TODO
 */

@Component
public class CalculatorImpl implements Calculator{

        @Override
        public int add(int i, int j) {
            int result = i + j;
            System.out.println("方法内部 result = " + result);
            return result;
        }
        @Override
        public int sub(int i, int j) {
            int result = i - j;
            System.out.println("方法内部 result = " + result);
            return result;
        }
        @Override
        public int mul(int i, int j) {
            int result = i * j;
            System.out.println("方法内部 result = " + result);
            return result;
        }
        @Override
        public int div(int i, int j) {
            int result = i / j;
            System.out.println("方法内部 result = " + result);
            return result;
        }

}
